ILockBytes - File-Based Implementation
Implemented
on a byte array object underlying an OLE compound file storage object, and
designed to read and write directly to a disk file.
When to Use
Methods of ILockBytes are called from the
compound file implementations of IStorage and IStream on the compound file storage object created
through a call to StgCreateDocfile, so you do not need to call them directly.
Remarks
ILockBytes::ReadAt
This method
queries the wrapped pointer for the requested interface.
ILockBytes::WriteAt
This method
queries the wrapped pointer for the requested interface.
ILockBytes::Flush
This method
queries the wrapped pointer for the requested interface.
ILockBytes::SetSize
This method
queries the wrapped pointer for the requested interface.
ILockBytes::LockRegion
The dwLockTypes
parameter is set to LOCK_ONLYONCE OR LOCK_EXCLUSIVE, which will allow or
restrict access to locked regions.
ILockBytes::UnlockRegion
This method
unlocks the region locked by ILockBytes::LockRegion.
ILockBytes::Stat
The OLE-provided
IStorage::Stat
implementation calls the ILockBytes::Stat method to retrieve information
about the byte array object. If there is no reasonable name for the byte array,
the OLE-provided ILockBytes::Stat method returns NULL in the pwcsName
field of the STATSTG structure.
See Also